.class public Lcom/facebook/orca/auth/UpgradeScreenActivity;
.super Lcom/facebook/orca/activity/OrcaFragmentActivity;
.source "UpgradeScreenActivity.java"


# instance fields
.field private a:Lcom/facebook/orca/app/OrcaAppType;
    .annotation runtime Lcom/google/inject/Inject;
    .end annotation
.end field

.field private n:Lcom/facebook/orca/cache/DataCache;
    .annotation runtime Lcom/google/inject/Inject;
    .end annotation
.end field

.field private o:Lcom/facebook/orca/activity/AuthenticatingActivityHelper;
    .annotation runtime Lcom/google/inject/Inject;
    .end annotation
.end field

.field private p:Landroid/widget/Button;
    .annotation runtime Lroboguice/inject/InjectView;
        a = 0x7f08011f
    .end annotation
.end field

.field private q:Landroid/widget/Button;
    .annotation runtime Lroboguice/inject/InjectView;
        a = 0x7f080120
    .end annotation
.end field

.field private r:Lcom/facebook/orca/ops/OrcaServiceFragment;

.field private s:Lcom/facebook/orca/ops/OrcaServiceFragment;


# direct methods
.method public constructor <init>()V
    .locals 0

    .prologue
    .line 32
    invoke-direct {p0}, Lcom/facebook/orca/activity/OrcaFragmentActivity;-><init>()V

    return-void
.end method

.method static synthetic a(Lcom/facebook/orca/auth/UpgradeScreenActivity;)V
    .locals 0
    .parameter

    .prologue
    .line 32
    invoke-direct {p0}, Lcom/facebook/orca/auth/UpgradeScreenActivity;->b()V

    return-void
.end method

.method static synthetic a(Lcom/facebook/orca/auth/UpgradeScreenActivity;Ljava/lang/Exception;)V
    .locals 0
    .parameter
    .parameter

    .prologue
    .line 32
    invoke-direct {p0, p1}, Lcom/facebook/orca/auth/UpgradeScreenActivity;->a(Ljava/lang/Exception;)V

    return-void
.end method

.method private a(Ljava/lang/Exception;)V
    .locals 0
    .parameter

    .prologue
    .line 141
    invoke-virtual {p0}, Lcom/facebook/orca/auth/UpgradeScreenActivity;->finish()V

    .line 142
    return-void
.end method

.method private b()V
    .locals 3

    .prologue
    .line 110
    iget-object v0, p0, Lcom/facebook/orca/auth/UpgradeScreenActivity;->n:Lcom/facebook/orca/cache/DataCache;

    invoke-virtual {v0}, Lcom/facebook/orca/cache/DataCache;->i()Lcom/facebook/orca/appconfig/AppConfig;

    move-result-object v0

    .line 111
    if-eqz v0, :cond_0

    invoke-virtual {v0}, Lcom/facebook/orca/appconfig/AppConfig;->c()Ljava/lang/String;

    move-result-object v1

    if-eqz v1, :cond_0

    .line 112
    invoke-virtual {v0}, Lcom/facebook/orca/appconfig/AppConfig;->c()Ljava/lang/String;

    move-result-object v0

    invoke-static {v0}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;

    move-result-object v0

    .line 117
    :goto_0
    new-instance v1, Landroid/content/Intent;

    const-string v2, "android.intent.action.VIEW"

    invoke-direct {v1, v2, v0}, Landroid/content/Intent;-><init>(Ljava/lang/String;Landroid/net/Uri;)V

    .line 118
    invoke-virtual {p0, v1}, Lcom/facebook/orca/auth/UpgradeScreenActivity;->startActivity(Landroid/content/Intent;)V

    .line 119
    return-void

    .line 114
    :cond_0
    iget-object v0, p0, Lcom/facebook/orca/auth/UpgradeScreenActivity;->a:Lcom/facebook/orca/app/OrcaAppType;

    invoke-virtual {v0}, Lcom/facebook/orca/app/OrcaAppType;->getDefaultUpgradeUrl()Ljava/lang/String;

    move-result-object v0

    invoke-static {v0}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;

    move-result-object v0

    goto :goto_0
.end method

.method static synthetic b(Lcom/facebook/orca/auth/UpgradeScreenActivity;)V
    .locals 0
    .parameter

    .prologue
    .line 32
    invoke-direct {p0}, Lcom/facebook/orca/auth/UpgradeScreenActivity;->c()V

    return-void
.end method

.method private c()V
    .locals 3

    .prologue
    .line 122
    iget-object v0, p0, Lcom/facebook/orca/auth/UpgradeScreenActivity;->s:Lcom/facebook/orca/ops/OrcaServiceFragment;

    invoke-virtual {v0}, Lcom/facebook/orca/ops/OrcaServiceFragment;->b()Z

    move-result v0

    if-eqz v0, :cond_0

    .line 127
    :goto_0
    return-void

    .line 126
    :cond_0
    iget-object v0, p0, Lcom/facebook/orca/auth/UpgradeScreenActivity;->s:Lcom/facebook/orca/ops/OrcaServiceFragment;

    const-string v1, "logout"

    const/4 v2, 0x0

    invoke-virtual {v0, v1, v2}, Lcom/facebook/orca/ops/OrcaServiceFragment;->a(Ljava/lang/String;Landroid/os/Bundle;)V

    goto :goto_0
.end method

.method static synthetic c(Lcom/facebook/orca/auth/UpgradeScreenActivity;)V
    .locals 0
    .parameter

    .prologue
    .line 32
    invoke-direct {p0}, Lcom/facebook/orca/auth/UpgradeScreenActivity;->d()V

    return-void
.end method

.method private d()V
    .locals 1

    .prologue
    .line 130
    iget-object v0, p0, Lcom/facebook/orca/auth/UpgradeScreenActivity;->o:Lcom/facebook/orca/activity/AuthenticatingActivityHelper;

    invoke-virtual {v0}, Lcom/facebook/orca/activity/AuthenticatingActivityHelper;->e()Z

    move-result v0

    if-nez v0, :cond_0

    .line 131
    invoke-virtual {p0}, Lcom/facebook/orca/auth/UpgradeScreenActivity;->finish()V

    .line 132
    iget-object v0, p0, Lcom/facebook/orca/auth/UpgradeScreenActivity;->o:Lcom/facebook/orca/activity/AuthenticatingActivityHelper;

    invoke-virtual {v0}, Lcom/facebook/orca/activity/AuthenticatingActivityHelper;->d()Landroid/content/Intent;

    move-result-object v0

    invoke-virtual {p0, v0}, Lcom/facebook/orca/auth/UpgradeScreenActivity;->startActivity(Landroid/content/Intent;)V

    .line 134
    :cond_0
    return-void
.end method

.method static synthetic d(Lcom/facebook/orca/auth/UpgradeScreenActivity;)V
    .locals 0
    .parameter

    .prologue
    .line 32
    invoke-direct {p0}, Lcom/facebook/orca/auth/UpgradeScreenActivity;->e()V

    return-void
.end method

.method private e()V
    .locals 0

    .prologue
    .line 137
    invoke-virtual {p0}, Lcom/facebook/orca/auth/UpgradeScreenActivity;->finish()V

    .line 138
    return-void
.end method


# virtual methods
.method protected a(Landroid/os/Bundle;)V
    .locals 1
    .parameter

    .prologue
    .line 51
    invoke-super {p0, p1}, Lcom/facebook/orca/activity/OrcaFragmentActivity;->a(Landroid/os/Bundle;)V

    .line 52
    const v0, 0x7f03004a

    invoke-virtual {p0, v0}, Lcom/facebook/orca/auth/UpgradeScreenActivity;->setContentView(I)V

    .line 53
    return-void
.end method

.method public b(Landroid/os/Bundle;)V
    .locals 3
    .parameter

    .prologue
    .line 57
    invoke-super {p0, p1}, Lcom/facebook/orca/activity/OrcaFragmentActivity;->b(Landroid/os/Bundle;)V

    .line 59
    iget-object v0, p0, Lcom/facebook/orca/auth/UpgradeScreenActivity;->p:Landroid/widget/Button;

    new-instance v1, Lcom/facebook/orca/auth/UpgradeScreenActivity$1;

    invoke-direct {v1, p0}, Lcom/facebook/orca/auth/UpgradeScreenActivity$1;-><init>(Lcom/facebook/orca/auth/UpgradeScreenActivity;)V

    invoke-virtual {v0, v1}, Landroid/widget/Button;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 65
    iget-object v0, p0, Lcom/facebook/orca/auth/UpgradeScreenActivity;->q:Landroid/widget/Button;

    new-instance v1, Lcom/facebook/orca/auth/UpgradeScreenActivity$2;

    invoke-direct {v1, p0}, Lcom/facebook/orca/auth/UpgradeScreenActivity$2;-><init>(Lcom/facebook/orca/auth/UpgradeScreenActivity;)V

    invoke-virtual {v0, v1}, Landroid/widget/Button;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 72
    const-string v0, "fetchAppConfig"

    invoke-virtual {p0, v0}, Lcom/facebook/orca/auth/UpgradeScreenActivity;->a(Ljava/lang/String;)Lcom/facebook/orca/ops/OrcaServiceFragment;

    move-result-object v0

    iput-object v0, p0, Lcom/facebook/orca/auth/UpgradeScreenActivity;->r:Lcom/facebook/orca/ops/OrcaServiceFragment;

    .line 73
    iget-object v0, p0, Lcom/facebook/orca/auth/UpgradeScreenActivity;->r:Lcom/facebook/orca/ops/OrcaServiceFragment;

    new-instance v1, Lcom/facebook/orca/auth/UpgradeScreenActivity$3;

    invoke-direct {v1, p0}, Lcom/facebook/orca/auth/UpgradeScreenActivity$3;-><init>(Lcom/facebook/orca/auth/UpgradeScreenActivity;)V

    invoke-virtual {v0, v1}, Lcom/facebook/orca/ops/OrcaServiceFragment;->a(Lcom/facebook/orca/ops/OrcaServiceOperation$OnCompletedListener;)V

    .line 83
    const-string v0, "logoutOperation"

    invoke-virtual {p0, v0}, Lcom/facebook/orca/auth/UpgradeScreenActivity;->a(Ljava/lang/String;)Lcom/facebook/orca/ops/OrcaServiceFragment;

    move-result-object v0

    iput-object v0, p0, Lcom/facebook/orca/auth/UpgradeScreenActivity;->s:Lcom/facebook/orca/ops/OrcaServiceFragment;

    .line 84
    iget-object v0, p0, Lcom/facebook/orca/auth/UpgradeScreenActivity;->s:Lcom/facebook/orca/ops/OrcaServiceFragment;

    new-instance v1, Lcom/facebook/orca/auth/UpgradeScreenActivity$4;

    invoke-direct {v1, p0}, Lcom/facebook/orca/auth/UpgradeScreenActivity$4;-><init>(Lcom/facebook/orca/auth/UpgradeScreenActivity;)V

    invoke-virtual {v0, v1}, Lcom/facebook/orca/ops/OrcaServiceFragment;->a(Lcom/facebook/orca/ops/OrcaServiceOperation$OnCompletedListener;)V

    .line 95
    iget-object v0, p0, Lcom/facebook/orca/auth/UpgradeScreenActivity;->s:Lcom/facebook/orca/ops/OrcaServiceFragment;

    new-instance v1, Lcom/facebook/orca/ops/DialogBasedProgressIndicator;

    const v2, 0x7f0a001b

    invoke-direct {v1, p0, v2}, Lcom/facebook/orca/ops/DialogBasedProgressIndicator;-><init>(Landroid/content/Context;I)V

    invoke-virtual {v0, v1}, Lcom/facebook/orca/ops/OrcaServiceFragment;->a(Lcom/facebook/orca/ops/OperationProgressIndicator;)V

    .line 97
    return-void
.end method

.method protected onResume()V
    .locals 3

    .prologue
    .line 101
    invoke-super {p0}, Lcom/facebook/orca/activity/OrcaFragmentActivity;->onResume()V

    .line 102
    iget-object v0, p0, Lcom/facebook/orca/auth/UpgradeScreenActivity;->r:Lcom/facebook/orca/ops/OrcaServiceFragment;

    invoke-virtual {v0}, Lcom/facebook/orca/ops/OrcaServiceFragment;->b()Z

    move-result v0

    if-nez v0, :cond_0

    .line 104
    iget-object v0, p0, Lcom/facebook/orca/auth/UpgradeScreenActivity;->r:Lcom/facebook/orca/ops/OrcaServiceFragment;

    const-string v1, "get_app_info"

    new-instance v2, Landroid/os/Bundle;

    invoke-direct {v2}, Landroid/os/Bundle;-><init>()V

    invoke-virtual {v0, v1, v2}, Lcom/facebook/orca/ops/OrcaServiceFragment;->a(Ljava/lang/String;Landroid/os/Bundle;)V

    .line 106
    :cond_0
    return-void
.end method
